package com.itehima.File;

import java.io.File;

public class Demo01 {

    public static void main(String[] args) {

        String pathname="E:\\a.txt";
        File file1 = new File(pathname);
        System.out.println(file1);

        String parent="e:\\aaa";
        String child="a.txt";
        File file2 = new File(parent, child);
        System.out.println(file2);//e:\aaa\a.txt

        //通过父级路径和子字符串
        String child2="bbb.txt";
        File parent1=new File("e:\\ccc");
        File file3 = new File(parent1, child2);
        System.out.println(file3);
    }
}
